<template>
	<view class="wrap" style="padding-bottom: 60px;">
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
		<!-- 当前套餐 -->
		<view v-if="current === 0">
			<u-form  :data="user" ref="user" class="apply-form-field">
				<!-- <u-gap height="20" bg-color="#f5f5f5"></u-gap> -->
			
	
								<u-form-item label="姓名" prop="name" label-width="150" >
									<u-input v-model="user.name" placeholder="请选择" type="input" class="form-field-select" disabled/>							
								</u-form-item>
								
								<u-select v-model="show_belongingGasStation" mode="single-column" :list="list_belongingGasStation" @confirm="confirm_workplace">
								</u-select>
								<u-form-item label="部门" prop="workPlace" label-width="150" :label-position="labelPosition" style="display:none">
									<u-input :border="border" type="select"  v-model="user.workPlace" placeholder="请选择"
									 @click="show_belongingGasStation = true"></u-input>
								</u-form-item>
								
								<u-form-item label="部门" prop="workPlace_c" label-width="150" :label-position="labelPosition" >
									<u-input :border="border" type="input"  v-model="user.workPlace_c" placeholder="请选择" disabled
									 ></u-input>
								</u-form-item>
				<u-form-item label="工号" prop="userName" label-width="150" >
				<u-input v-model="user.userName"placeholder="请选择" type="input" class="form-field-select" disabled/>							
				</u-form-item>
				
			
				          <u-gap height="20" bg-color="#f5f5f5"></u-gap>
								<u-form-item label="钢瓶编号" prop="cylinderNumber" label-width="150" >
									<u-input v-model="user.cylinderNumber" placeholder="请输入" type="input" class="form-field-select"/>		
								</u-form-item>
								
								
								<u-select v-model="show_belongingGasStation" mode="single-column" :list="list_belongingGasStation" @confirm="confirm_belongingGasStation">
								</u-select>
								<u-form-item label="所属气站" prop="belongingGasStation" label-width="150" :label-position="labelPosition" style="display:none">
									<u-input :border="border" type="select"  v-model="user.belongingGasStation" placeholder="请选择"
									 @click="show_belongingGasStation = true"></u-input>
								</u-form-item>
								
								<u-form-item label="所属气站" prop="belongingGasStation_c" label-width="150" :label-position="labelPosition">
									<u-input :border="border" type="input"  v-model="user.belongingGasStation_c" placeholder="请选择" disabled
									 ></u-input>
								</u-form-item>
								
								
									
									<!-- <uni-data-select   
									v-model="personInfo.storeId"
									:localdata="storeList" 
									@change="storeIdChange"
									:clear="false">
									</uni-data-select> -->
									
									
								<div v-if="user.userId==3||user.userId==4">
								<u-form-item label="钢瓶容积" prop="volume" label-width="150" >
								<u-input v-model="user.volume" placeholder="请输入" type="input"  class="form-field-select"/>
								</u-form-item>
						
								<u-form-item label="钢瓶重量"  prop="weight" label-width="150" >
								<u-input v-model="user.weight" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item>
								
								
								<u-form-item label="生产日期" prop="manufactureDate" label-width="180" >
								<uni-datetime-picker type="datetime" v-model="user.manufactureDate"  />
								</u-form-item>
								
								<u-form-item label="报废日期" prop="manufactureDate" label-width="180" >
								<!-- <uni-section :title="'日期时间用法：' + user.scrapDate" type="line" ></uni-section> -->
										
											<uni-datetime-picker type="datetime" v-model="user.scrapDate"  />
										
								</u-form-item>
								
								<u-form-item label="气瓶制造单位"  prop="manufacturingUnits" label-width="180" >
								<u-input v-model="user.manufacturingUnits" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item>
								
								<u-form-item label="气瓶检测日期" prop="inspectionTime" label-width="200" >
								<uni-datetime-picker type="datetime" v-model="user.inspectionTime"  />
								</u-form-item>
							
								<u-form-item label="下次检测日期" prop="nextInspectionTime" label-width="200" >
								<uni-datetime-picker type="datetime" v-model="user.nextInspectionTime"  />
								</u-form-item>
								</div>
								<!-- <u-form-item label="报废日期" prop="scrapDate" label-width="150" >
								<u-input v-model="user.scrapDate" placeholder="请输入(例如:2022-01-01)"  type="input" class="form-field-select"/>
								</u-form-item> -->
								
<!-- 								<u-form-item label="钢瓶状态" prop="cylinderStatus" label-width="150" right-icon="arrow-right">
									<u-input v-model="user.cylinderStatus"placeholder="正常" type="input" class="form-field-select"/>						
								</u-form-item> -->
								
								

								<u-select v-model="show_cylinderStatus" mode="single-column" :list="list_cylinderStatus" 
								@confirm="confirm_cylinderStatus">
								</u-select>
								<u-form-item label="钢瓶状态" prop="cylinderStatus_c" label-width="150" :label-position="labelPosition">
									<u-input :border="border" type="select"  v-model="user.cylinderStatus_c" placeholder="请选择"
									 @click="show_cylinderStatus = true"></u-input>
								</u-form-item>
								<!-- 隐藏的 -->
								<u-form-item label="钢瓶状态" prop="cylinderStatus" label-width="150" :label-position="labelPosition" style="display:none">
									<u-input :border="border" type="select"  v-model="user.cylinderStatus" placeholder="请选择"
									 @click="show_cylinderStatus = true"></u-input>
								</u-form-item>

								<u-select v-model="show_integrityBottle" mode="single-column" :list="list_integrityBottle"
								@confirm="confirm_integrityBottle">
								</u-select>
								<u-form-item label="瓶体完好程度" prop="integrityBottle_c" label-width="180" :label-position="labelPosition">
									<u-input :border="border" type="select"  v-model="user.integrityBottle_c" placeholder="请选择"
									 @click="show_integrityBottle = true"></u-input>
								</u-form-item>
								<!-- 隐藏的 -->
								<u-form-item label="瓶体完好程度" prop="integrityBottle" label-width="180" :label-position="labelPosition" style="display:none">
									<u-input :border="border" type="select"  v-model="user.integrityBottle"  placeholder="请选择"
									 @click="show_integrityBottle = true"></u-input>
								</u-form-item>
								 
								
								<u-select v-model="show_valveIntegrity" mode="single-column" :list="list_valveIntegrity"
								@confirm="confirm_valveIntegrity">
								</u-select>
								<u-form-item label="阀门完好程度" prop="valveIntegrity_c" label-width="180" :label-position="labelPosition">
									<u-input :border="border" type="select"  v-model="user.valveIntegrity_c" placeholder="请选择"
									 @click="show_valveIntegrity = true"></u-input>
								</u-form-item>
								<!-- 隐藏的 -->
								<u-form-item label="阀门完好程度" prop="valveIntegrity" label-width="180" :label-position="labelPosition" style="display:none">
									<u-input :border="border" type="select"  v-model="user.valveIntegrity"  placeholder="请选择"
									 @click="show_valveIntegrity = true"></u-input>
								</u-form-item>
								
								
								
								
								
								
<!-- 								<u-form-item label="应充介质" prop="gasMedia" label-width="150" right-icon="arrow-right">
									<u-input v-model="user.gasMedia" placeholder="氧气"type="input" class="form-field-select"/>						
								</u-form-item> -->
								<!-- 隐藏的 -->
								<u-select v-model="show_gasMedia" mode="single-column" :list="list_gasMedia"
								@confirm="confirm_gasMedia">
								</u-select>
								<u-form-item label="应充介质" prop="gasMedia" label-width="150" :label-position="labelPosition"  style="display:none">
									<u-input :border="border" type="select"  v-model="user.gasMedia" placeholder="请选择"
									 @click="show_gasMedia = true"></u-input>
									 
								</u-form-item>
								
								
								
								
								<u-form-item label="应充介质" prop="gasMedia_c" label-width="150" :label-position="labelPosition">
									<u-input :border="border" type="select"  v-model="user.gasMedia_c" placeholder="请选择"
									 @click="show_gasMedia = true"></u-input>
								</u-form-item>
								
								
								<div v-if="user.userId==4">
									<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<!-- 								<u-form-item label="充装气站" prop="fillingStation" label-width="150" >
								<u-input v-model="user.fillingStation" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item> -->
								
								<u-select v-model="show_fillingStation" mode="single-column" :list="list_belongingGasStation"
								@confirm="confirm_fillingStation" >
								</u-select>
								<u-form-item label="充装气站" prop="note4"  label-width="150" :label-position="labelPosition" style="display:none">
									<u-input :border="border" type="select"  v-model="user.note4" placeholder="请选择" 
									 @click="show_fillingStation = true "  ></u-input>
								</u-form-item>
								
								<u-form-item label="充装气站" prop="note4_c"  label-width="150" :label-position="labelPosition" >
									<u-input :border="border" type="input"  v-model="user.note4_c" placeholder="请选择" disabled
									 ></u-input>
								</u-form-item>
								 
 							
								<u-select v-model="show_fillingMedium" mode="single-column" :list="list_gasMedia"
								@confirm="confirm_fillingMedium">
								</u-select>
								<u-form-item label="充装介质" prop="note5" label-width="150" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.note5" placeholder="请选择" 
									 @click="show_fillingMedium = true"></u-input>
								</u-form-item>
								
								<u-form-item label="充装介质" prop="note5_c" label-width="150" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.note5_c" placeholder="请选择" 
									 @click="show_fillingMedium = true"></u-input>
								</u-form-item>
								
								
								
								
								
								<u-form-item label="充装压力" prop="fillingPressure" label-width="150" >
								<u-input v-model="user.fillingPressure" placeholder="请输入" type="input"  class="form-field-select"/>
								</u-form-item>
								<u-form-item label="充装温度" prop="fillingTemperature" label-width="150" >
								<u-input v-model="user.fillingTemperature" placeholder="请输入" type="input"  class="form-field-select"/>
								</u-form-item>
								
								<u-select v-model="show_anomalies" mode="single-column" :list="list_anomalies"
								@confirm="confirm_anomalies">
								</u-select>
								<u-form-item label="有无异常情况" prop="anomalies" label-width="180" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.anomalies" placeholder="请选择" 
									 @click="show_anomalies = true"></u-input>
								</u-form-item>
								
								<u-form-item label="有无异常情况" prop="anomalies_c" label-width="180" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.anomalies_c" placeholder="请选择" 
									 @click="show_anomalies = true"></u-input>
								</u-form-item>
								
								
								
								<u-form-item label="运输车辆" prop="transportVehicles" label-width="150" >
								<u-input v-model="user.transportVehicles" placeholder="请输入" type="input"  class="form-field-select"/>
								</u-form-item>
								
								</div>
								<!-- <u-form-item label="充装时间" prop="fillingTime" label-width="150">
								<u-input v-model="user.fillingTime" placeholder="请输入(例如:2022-01-01)" type="input" class="form-field-select"/>
								</u-form-item> -->
							<div v-if="user.userId==7">
								
								<u-gap height="20" bg-color="#f5f5f5"></u-gap>
								<u-form-item label="下次检验期限" prop="nextInspectionDeadline" label-width="180" >
								<uni-datetime-picker type="datetime" v-model="user.nextInspectionDeadline"  />
								</u-form-item>
								<u-select v-model="show_visualInspertion" mode="single-column" :list="list_visualInspertion"
								@confirm="confirm_visualInspertion">
								</u-select>
								<u-form-item label="外观检查" prop="visualInspertion" label-width="150" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.visualInspertion" placeholder="请选择" 
									 @click="show_visualInspertion = true"></u-input>
								</u-form-item>
								
								<u-form-item label="外观检查" prop="visualInspertion_c" label-width="150" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.visualInspertion_c" placeholder="请选择" 
									 @click="show_visualInspertion = true"></u-input>
								</u-form-item>
								
								<u-form-item label="涂色"  prop="coloring" label-width="150" >
								<u-input v-model="user.coloring" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item>
								
								<u-form-item label="油污"  prop="greasyDirt" label-width="150" >
								<u-input v-model="user.greasyDirt" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item>
								
								
								<u-form-item label="余压"  prop="residualPressure" label-width="150" >
								<u-input v-model="user.residualPressure" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item>
								<u-form-item label="不明气体分析"  prop="unidentifiedGasAnalysis" label-width="200" >
								<u-input v-model="user.unidentifiedGasAnalysis" placeholder="请输入" type="input" class="form-field-select"/>
								</u-form-item>
								<u-form-item label="充装压力" prop="fillingPressure" label-width="150" >
								<u-input v-model="user.fillingPressure" placeholder="请输入" type="input"  class="form-field-select"/>
								</u-form-item>
								
								
								<u-select v-model="show_exportThreadStyle" mode="single-column" :list="list_exportThreadStyle"
								@confirm="confirm_exportThreadStyle">
								</u-select>
								<u-form-item label="出口螺纹样式" prop="exportThreadStyle" label-width="200" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.exportThreadStyle" placeholder="请选择" 
									 @click="show_exportThreadStyle = true"></u-input>
								</u-form-item>
								
								<u-form-item label="出口螺纹样式" prop="exportThreadStyle_c" label-width="200" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.exportThreadStyle_c" placeholder="请选择" 
									 @click="show_exportThreadStyle = true"></u-input>
								</u-form-item>
								
							
								
								<u-select v-model="show_sealingSituation" mode="single-column" :list="list_sealingSituation"
								@confirm="confirm_sealingSituation">
								</u-select>
								<u-form-item label="密封情况" prop="sealingSituation" label-width="200" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.sealingSituation" placeholder="请选择" 
									 @click="show_sealingSituation = true"></u-input>
								</u-form-item>
								
								<u-form-item label="密封情况" prop="sealingSituation_c" label-width="200" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.sealingSituation_c" placeholder="请选择" 
									 @click="show_sealingSituation = true"></u-input>
								</u-form-item>
								
								
								<u-select v-model="show_deformation" mode="single-column" :list="list_deformation"
								@confirm="confirm_deformation">
								</u-select>
								<u-form-item label="瓶体是否变形" prop="deformation" label-width="200" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.deformation" placeholder="请选择" 
									 @click="show_deformation = true"></u-input>
								</u-form-item>
								
								<u-form-item label="瓶体是否变形" prop="deformation_c" label-width="200" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.deformation_c" placeholder="请选择" 
									 @click="show_deformation = true"></u-input>
								</u-form-item>
								
								
								<u-select v-model="show_bottleTemperatureAbnormalities" mode="single-column" :list="list_bottleTemperatureAbnormalities"
								@confirm="confirm_bottleTemperatureAbnormalities">
								</u-select>
								<u-form-item label="瓶温异常情况" prop="bottleTemperatureAbnormalities" label-width="200" :label-position="labelPosition" style="display:none">
									<u-input :border="border"  type="select" v-model="user.bottleTemperatureAbnormalities" placeholder="请选择" 
									 @click="show_bottleTemperatureAbnormalities = true"></u-input>
								</u-form-item>
								
								<u-form-item label="瓶温异常情况" prop="bottleTemperatureAbnormalities_c" label-width="200" :label-position="labelPosition">
									<u-input :border="border"  type="select" v-model="user.bottleTemperatureAbnormalities_c"  
									 @click="show_bottleTemperatureAbnormalities = true"></u-input>
								</u-form-item>
								
								
								
							</div>
				
			</u-form>
			
			<u-row gutter="32" class="bottom-box" justify="center" style="margin-bottom: 20px;margin-left: 35px;">
				<u-col span="10" >
					<view><u-button type="primary"  shape="circle" @click="submitForm">确定</u-button></view>
				</u-col>
			</u-row>
			</div>
		</view>
	
		
	</view>
</template>
<script>
export default {	
	
	
	data() {
			return {
			show: false,	
			single: '',
			datetimesingle: '',
			range: ['2021-02-1', '2024-3-28'],
			datetimerange: [],
			start: Date.now() - 1000000000,
			end: Date.now() + 1000000000,		
			user:[],
			subjectAarr:[0],
			loading: true,			
			total: 0,			
			option:[]||"",
			m2mSimflowList:[],
			m2mOrderFlowList:[],
			free:{
				note5:"",
				cylinderStatus:"",
				gasMedia:"",
				note4:"",
				belongingGasStation:"",
			},
			current: 0,
			a:[],
			status: 'loadmore',
			iconType: 'circle',
			isDot: false,
			loadText: {
						loadmore: '点击加载更多',
						loading: '正在加载...',
						nomore: '没有更多了'
			},
			show_belongingGasStation: false,
			list_belongingGasStation: [
						{
							value: '101',
							label: '锦州御龙气体有限公司'
						},
						{
							value: '102',
							label: '锦州市宏远溶解乙炔有限责任公司'
						},
						{
							value: '103',
							label: '凌海金晟气体有限公司'
						},
						{
							value: '104',
							label: '锦州市天赢气体有限公司'
						},
						{
							value: '105',
							label: '锦州全福气体有限公司'
						},
						{
							value: '106',
							label: '北镇市永峰氧气厂'
						},{
							value: '107',
							label: '北镇市英田气体经销处'
						},{
							value: '108',
							label: '黑山洋合九州氧气站'
						},{
							value: '109',
							label: '锦州锦抚气体有限公司'
						},{
							value: '110',
							label: '义县天财气体厂'
						},
						{
							value: '111',
							label: '锦州凤宇乙炔有限公司'
						},
						{
							value: '112',
							label: '锦州市宝钛华神钛业有限公司'
						},
                        {
                         value: '113',
                         label: '锦州市环宇气体有限公司'
                        },
						{
						 value: '114',
						 label: '锦州安燃高能切割气有限公司'
						},
			],
			show_cylinderStatus: false,
			list_cylinderStatus: [
						{
							value: '0',
							label: '正常'
						},
						{
							value: '1',
							label: '异常'
						}
			],
			// 瓶体完好程度
			show_integrityBottle:false,
			list_integrityBottle: [
						{
							value: '0',
							label: '完好'
						},
						{
							value: '1',
							label: '不完好'
						}
			],
			
			// 阀门完好程度
			show_valveIntegrity:false,
			list_valveIntegrity: [
						{
							value: '0',
							label: '完好'
						},
						{
							value: '1',
							label: '不完好'
						}
			],
			
			show_anomalies: false,
			list_anomalies: [
						{
							value: '0',
							label: '有'
						},
						{
							value: '1',
							label: '无'
						}
			],
			
			show_visualInspertion:false,
			list_visualInspertion: [
						{
							value: '0',
							label: '正常'
						},
						{
							value: '1',
							label: '异常'
						}
			],
			show_exportThreadStyle:false,
			list_exportThreadStyle: [
						{
							value: '0',
							label: '右'
						},
						{
							value: '1',
							label: '左'
						}
			],
			show_sealingSituation:false,
			list_sealingSituation: [
						{
							value: '0',
							label: '正常'
						},
						{
							value: '1',
							label: '异常'
						}
			],
			show_deformation:false,
			list_deformation: [
						{
							value: '0',
							label: '正常'
						},
						{
							value: '1',
							label: '异常'
						}
			],
			
			show_bottleTemperatureAbnormalities:false,
			list_bottleTemperatureAbnormalities: [
						{
							value: '0',
							label: '正常'
						},
						{
							value: '1',
							label: '异常'
						}
			],
			
			
			show_gasMedia: false,
			list_gasMedia: [
						{
							value: '0',
							label: '氮气'
						},
						{
							value: '1',
							label: '氧气'
						},
						{
							value: '2',
							label: '丙烷'
						},
						{
							value: '3',
							label: '医用氧气'
						},
						{
							value: '4',
							label: '二氧化碳'
						},
						{
							value: '5',
							label: '氩气'
						},
						{
							value: '6',
							label: '氩-二氧化碳混合气'
						},
						{
							value: '7',
							label: '溶解乙炔'
						},
						{
							value: '8',
							label: '乙炔'
						},
						{
							value: '9',
							label: '氢气'
						},
            {
              value: '10',
              label: '氯气'
            },
            {
              value: '11',
              label: '天然气(天然气切割气)'
            },{
              value: '12',
              label: '液化天然气(切割气)'
            },
        {
          value: '13',
          label: '氦气'
        },
			],
			show_fillingStation: false,
			list_fillingStation: [
						{
							
							label: '气站1',value: '001',
						},
						{
							value: '002',
							label: '气站2'
						},
						{
							value: '003',
							label: '气站3'
						}
			],
			show_fillingMedium: false,
			list_fillingMedium: [
						{
							value: '0',
							label: '氧气'
						},
						{
							value: '1',
							label: '氮气'
						},
						{
							value: '2',
							label: '氢气'
						}
			],
			
			}
		},
		created(){
			
		},
		
		
	
		
		
		
		
		methods: {
			ss(){
				console.log("hello world");
			},
			changeLog(e) {
							console.log('change事件:', e);
						},
			showVaule(){
				console.log(this.user.belongingGasStation+"7777")
				let a = this.user.gasMedia
				let b = this.user.fillingMedium
				if(a==this.user.belongingGasStation){
					console.log("hello world")
				}
				// if(b==this.user.){
				// 	console.log("hello world")
				// }
			},
		
			onLoad: function (option) { //option为object类型，会序列化上个页面传递的参数
			        console.log(option.id+"7888"); 
					//打印出上个页面传递的参数。	
								this.a=option.id;
								console.log(this.a+"aaaa");
					this.getList();
					console.log(this.a+"bbbbb");
					
			    },			
			getList() {			  
				
			      this.$u.api.user1.listUser({
					//let id =  sessionStorage.getItem("a");
					id:this.a,
				  }).then(response => {
			      this.user = response.data;
				  this.value = this.user.belongingGasStation
				  this.user.integrityBottle='0'
				   this.user.valveIntegrity='0'
				   //钢瓶状态			  
				   for(let i=0;i<this.list_cylinderStatus.length;i++){
				  	    if(this.list_cylinderStatus[i].value==this.user.cylinderStatus){
				  		    this.user.cylinderStatus_c = this.list_cylinderStatus[i].label;
				      	    break
				  	    }
				      }
					  
					//介质
				  for(let i=0;i<this.list_gasMedia.length;i++){
										if(this.list_gasMedia[i].value==this.user.gasMedia){
											this.user.gasMedia_c = this.list_gasMedia[i].label;
							break
										}
					 }
					//阀门完好程度 
					 for(let i=0;i<this.list_valveIntegrity.length;i++){
					 										if(this.list_valveIntegrity[i].value==this.user.valveIntegrity){
					 											this.user.valveIntegrity_c = this.list_valveIntegrity[i].label;
					 							break
					 										}
					 					 }
					//	瓶体完好程度 		
							 for(let i=0;i<this.list_integrityBottle.length;i++){
							 										if(this.list_integrityBottle[i].value==this.user.integrityBottle){
							 											this.user.integrityBottle_c = this.list_integrityBottle[i].label;
							 							break
							 										}
							 					 }
				   //瓶身外观
				  for(let i=0;i<this.list_visualInspertion.length;i++){
				  										if(this.list_visualInspertion[i].value==this.user.visualInspertion){
				  											this.user.visualInspertion_c = this.list_visualInspertion[i].label;
				  							break
				  										}
				  					 }
					//出口螺纹样式				 
				  for(let i=0;i<this.list_exportThreadStyle.length;i++){
															if(this.list_exportThreadStyle[i].value==this.user.exportThreadStyle){
																this.user.exportThreadStyle_c = this.list_exportThreadStyle[i].label;
												break
															}
										 }		
					//密封情况					 
				  for(let i=0;i<this.list_sealingSituation.length;i++){
																if(this.list_sealingSituation[i].value==this.user.sealingSituation){
																	this.user.sealingSituation_c = this.list_sealingSituation[i].label;
													break
																}
											 }		
				  for(let i=0;i<this.list_anomalies.length;i++){
																					if(this.list_anomalies[i].value==this.user.anomalies){
																						this.user.anomalies_c = this.list_anomalies[i].label;
																		break
																					}
																 }						 
																	   
					//瓶体是否变形
				  for(let i=0;i<this.list_deformation.length;i++){
																					if(this.list_deformation[i].value==this.user.deformation){
																						this.user.deformation_c = this.list_deformation[i].label;
																		break
																					}
																 }	
					//瓶温异常情况																									
				  for(let i=0;i<this.list_bottleTemperatureAbnormalities.length;i++){
																										if(this.list_bottleTemperatureAbnormalities[i].value==this.user.bottleTemperatureAbnormalities){
																											this.user.bottleTemperatureAbnormalities_c = this.list_bottleTemperatureAbnormalities[i].label;
																							break
																										}
																					 }
					
																	   
				  //应充
				  for(let i=0;i<this.list_belongingGasStation.length;i++){
									
				  										if(this.list_belongingGasStation[i].value==this.user.note4){
				  											this.user.note4_c = this.list_belongingGasStation[i].label;
				  							break
				  										}
				  					 }
				  for(let i=0;i<this.list_gasMedia.length;i++){
				  					  
				  										if(this.list_gasMedia[i].value==this.user.note5){
				  											this.user.note5_c = this.list_gasMedia[i].label;
				  							break
				  										}
				  					 }
				  
				  for(let i=0;i<this.list_belongingGasStation.length;i++){
				  					 
				  										if(this.list_belongingGasStation[i].value==this.user.belongingGasStation){
				  											this.user.belongingGasStation_c = this.list_belongingGasStation[i].label;
				  							break
				  										}
				  					 }
				   for(let i=0;i<this.list_belongingGasStation.length;i++){
										 console.log(this.user.workplace+"sasd")
															if(this.list_belongingGasStation[i].value==this.user.workPlace){
																this.user.workPlace_c = this.list_belongingGasStation[i].label;
												break
															}
										 }
										 
					//判断当前用户为 建档
								//所属气站赋予部门值
					// 建档赋予默认值(为空，代表未建档，为3 代表 建档 过程)
					if(this.user.belongingGasStation == null)
					if(this.user.userId==3){
						this.user.belongingGasStation = this.user.workPlace;
						this.user.belongingGasStation_c = this.user.workPlace_c;
					}
					
			      this.loading = false;
			      });
				  

				  
				  
			    },
				
				
				
			
			navTo() {
				uni.navigateTo({
					url: '/pages/sys/workbench/nn'
				});
			},
			 /** 提交按钮 */
			    submitForm() {
					var timestamp = Date.parse(new Date());
					var  timey   =  Date.parse(this.user.scrapDate)
					console.log(timestamp+"asd"+timey)
					if(this.user.userId==7){
						if(this.user.workPlace!=this.user.belongingGasStation){
							uni.showToast({
											title: "气站必须相同",
											icon:'error',
											duration:850
											});
						}
						else{
							
							this.$u.api.user1.spectionUser(this.user).then(response => {			      						      
							});
							uni.showToast({
								title: '添加记录成功',
								//将值设置为 success 或者直接不用写icon这个参数
								icon: 'success',
								//显示持续时间为 2秒
								duration: 2000,
							});
							
							setTimeout(() => {
								uni.hideLoading()
								uni.redirectTo({
									url: '/pages/sys/workbench/add-form',
								});	
							}, 500)	
						}
					}
			        if (this.user.userId==4) {						
						if(this.user.workPlace!=this.user.belongingGasStation){
							uni.showToast({
											title: "气站必须相同",
											icon:'error',
											duration:850
											});
						}
									
						else if(this.user.note5!=this.user.gasMedia){
							uni.showToast({
												title: "介质必须相同",
												icon:'error',
												duration:850
												});
							}
						
						else if(timey<timestamp){
							uni.showToast({
												title: "已达到报废日期",
												icon:'error',
												duration:850
												});
							}	
										
						else{
							console.log(timey+"op"+timestamp)
							this.$u.api.user1.insertUser(this.user).then(response => {
							  // this.$modal.msgSuccess("新增成功");																		
							});
							uni.showToast({
								title: '充气成功',
								//将值设置为 success 或者直接不用写icon这个参数
								icon: 'success',
								//显示持续时间为 2秒
								duration: 2000,
							});
							// uni.redirectTo({
							// 	url: '/pages/sys/workbench/add-form',
							// });	      
							setTimeout(() => {
								uni.hideLoading()
								uni.redirectTo({
									url: '/pages/sys/workbench/add-form',
								});	
							}, 500)			
						}	           			
			         
					}
					
			        if (this.user.userId==3) {
						
						if(this.user.workPlace!=this.user.belongingGasStation){
							uni.showToast({
											title: "气站必须相同",
											icon:'error',
											duration:850
											});
						}
						else if(this.user.cylinderNumber==null){
							uni.showToast({
								title: "编号必须填写",
								icon:'error',
								duration:850
								});
						}
						else if(this.user.gasMedia==null){
							uni.showToast({
								title: "介质必须填写",
								icon:'error',
								duration:850
								});
												}
						else{
							this.user.note2 = this.a
							this.$u.api.user1.updateUser(this.user).then(response => {			      						      
							});
							uni.showToast({
								title: '建档成功',
								//将值设置为 success 或者直接不用写icon这个参数
								icon: 'success',
								//显示持续时间为 2秒
								duration: 2000,
							});
							// uni.redirectTo({
							// 	url: '/pages/sys/workbench/add-form',
							// });
							setTimeout(() => {
								uni.hideLoading()
								uni.redirectTo({
									url: '/pages/sys/workbench/add-form',
								});	
							}, 500)	
						}
			       		
			      }
			    },
				
				// 注意返回值为一个数组，单列时取数组的第一个元素即可(只有一个元素)
				confirm_belongingGasStation(e) {
					// console.log("e",e);
					// console.log("e.detail",e.detail)
					// console.log("e.detail[0]",e[0].label)
					this.user.belongingGasStation_c=e[0].label;
					// console.log("this.IndustryName",this.bb);
					
					this.user.belongingGasStation = e[0].value;
					//console.log(this.user.belongingGasStation+"ppp");
					
				},
				// 注意返回值为一个数组，单列时取数组的第一个元素即可(只有一个元素)
				confirm_cylinderStatus(e) {
					// console.log("e",e);
					// console.log("e.detail",e.detail)
					// console.log("e.detail[0]",e[0].label)
					this.user.cylinderStatus_c =e[0].label;
					this.user.cylinderStatus=e[0].value;
					
					// console.log("this.IndustryName",this.bb);
				},
				
				confirm_integrityBottle(e) {
					// console.log("e",e);
					// console.log("e.detail",e.detail)
					// console.log("e.detail[0]",e[0].label)
					this.user.integrityBottle_c =e[0].label;
					this.user.integrityBottle=e[0].value;
					
					// console.log("this.IndustryName",this.bb);
				},
				
				confirm_valveIntegrity(e) {
					// console.log("e",e);
					// console.log("e.detail",e.detail)
					// console.log("e.detail[0]",e[0].label)
					this.user.valveIntegrity_c =e[0].label;
					this.user.valveIntegrity=e[0].value;
					
					// console.log("this.IndustryName",this.bb);
				},
				
				
				
				confirm_workplace(e){
					this.user.workPlace_c=e[0].label;
					this.user.workPlace=e[0].value;
				},
				// 注意返回值为一个数组，单列时取数组的第一个元素即可(只有一个元素)
				confirm_gasMedia(e) {
					// console.log("e",e);
					// console.log("e.detail",e.detail)
					// console.log("e.detail[0]",e[0].label)
					this.user.gasMedia_c=e[0].label;
					this.user.gasMedia=e[0].value;
					
					// console.log("this.IndustryName",this.bb);
				},
				// 注意返回值为一个数组，单列时取数组的第一个元素即可(只有一个元素)
				confirm_fillingStation(e) {
					
					this.user.note4=e[0].value;
					
					this.user.note4_c=e[0].label;
				},
				// 注意返回值为一个数组，单列时取数组的第一个元素即可(只有一个元素)
				confirm_fillingMedium(e) {
					// console.log("e",e);
					console.log("e.detail",e[0].value)
					// console.log("e.detail[0]",e[0].label)
					this.user.note5=e[0].value;
					this.user.note5_c=e[0].label;
					// console.log("this.IndustryName",this.bb);
					
				},
				confirm_visualInspertion(e){
					console.log("e.detail",e[0].value)		
					this.user.visualInspertion=e[0].value;
					this.user.visualInspertion_c=e[0].label;
				},
				confirm_exportThreadStyle(e){
					//console.log("e.detail",e[0].value)		
					this.user.exportThreadStyle=e[0].value;
					this.user.exportThreadStyle_c=e[0].label;
				},
				confirm_sealingSituation(e){
					//console.log("e.detail",e[0].value)		
					this.user.sealingSituation=e[0].value;
					this.user.sealingSituation_c=e[0].label;
				},
				confirm_deformation(e){
					//console.log("e.detail",e[0].value)		
					this.user.deformation=e[0].value;
					this.user.deformation_c=e[0].label;
				},
				confirm_bottleTemperatureAbnormalities(e){
					//console.log("e.detail",e[0].value)		
					this.user.bottleTemperatureAbnormalities=e[0].value;
					this.user.bottleTemperatureAbnormalities_c=e[0].label;
				},
				confirm_anomalies(e){
					//console.log("e.detail",e[0].value)		
					this.user.anomalies=e[0].value;
					this.user.anomalies_c=e[0].label;
				},
		}

	}
</script>
<style lang="scss" scoped>
@import 'index.scss';
page {
	background-color: #f5f5f5;
}
.wrap .search{
	background: #ffffff;
}
.apply-text{
	font-size: 28rpx;
	color: #333333;
	span{
		color: #999999;
	}
}
.user-images{
	width: 28px;
	height:28px;
	margin-right: 8px;
}
.apply-list-foot{
	font-size: 28rpx;
}


.personnel-list{
	display: flex;
	align-items: center;
	flex-wrap:wrap;
	.personnel-user{
		position: relative;
		margin: 5px 9px 0;
	}
	.user-images{
		width: 48px;
		height:48px;
		margin-right:0;
		
	}
	.iconfont{
		position: absolute;
		top:-12px;
		right:-5px;
		color: #FE0100;
	}
}
</style>
